package etf.library;

import java.util.HashSet;
import java.util.Set;

public class Author {

	private String firstName;
	private String lastName;
	private String gender;
	private int age;
	
	private Set<Book> books = new HashSet<Book>(0);
	
	public Author(){
	}
	
	public Author(String firstName, String lastName, String gender, int age) {
		this.firstName = firstName;
		this.lastName = lastName;
		this.gender = gender;
		this.age = age;
		books = new HashSet<Book>();
	}

	public String getFirstName() {
		return firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	public String getLastName() {
		return lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	public String getGender() {
		return gender;
	}

	public void setGender(String gender) {
		this.gender = gender;
	}

	public Set<Book> getBooks() {
		return books;
	}
	
	public void setAge(int age) {
		this.age = age;
	}
	
	public void setBooks(Set<Book> books) {
		this.books = books;
	}

	public int getAge() {
		return age;
	}
	
	public void addBook(Book book){
		this.books.add(book);
	}
	
	@Override
	public String toString() {
		return "Author [firstName=" + firstName + ", lastName=" + lastName
				+ "]";
	}	
}
